﻿package com.d4p.util
{
	import flash.display.Sprite;

	public class RandomArray extends Sprite
	{
		public static function randomArray(arr:Array):Array
		{
			 for(var i=0;i<arr.length;i++){
		      var tmp=arr[i];
			  
				var randomNum=RandomUtil._randomIntInstance.getRandomInt(0, arr.length-1);
			  
		      arr[i]=arr[randomNum];
		      arr[randomNum]=tmp;
		   }
		   return arr;
		}
		
		public function RandomArray()
		{
			super();
		}
		
	}
}